package com.wanmait.zaisousuo.webcontroller;

import com.wanmait.zaisousuo.pojo.City;
import com.wanmait.zaisousuo.service.CityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/web")
public class CityController {
    @Resource
    private CityService cityService;

    @RequestMapping("city/findCities")
    @ResponseBody
    public List<City> findCities(Integer pid)
    {
        List<City> cities = cityService.findCity(pid);
        return cities;
    }

}
